Previous page Next page

Syntax

The CSS2 syntax the browser uses is made up of three parts - a wml tag with an attribute called style, a property, and a value:

WML tag style= “property: value”
 

The property is the attribute that will be changed, and each property can take a value. The property and value are separated by a colon and surrounded by quotes.

To specify more than one property, separate each property with a semi-colon:

style="property1:value1; property2: value2; ... ; propertyN: 
valueN"
 

The browser uses CSS2 with inline styles. The style attribute can be used with every WML tag. The style attribute can contain only the CSS properties the browser supports. The code example that follows shows how to change the color:

<p style="color: sienna">
 
This is a paragraph
 

</p>

Other examples include:

<wml> tag:
 
 <wml style= “|properties|”> .. </wml>
 
<card> tag:
 
 <card style= “|properties|” title=”Card Title”> .. </card>
 
<p> tag:
 
 <p style= “|properties|” mode=”wrap”> .. </p>
 
<a> tag:
 
 <a style= “|properties|” href=”...”>Link </a>
 

Previous page Next page